<div class="order">
    <div class="item-category">
        <ul>
            <li style="color: #FC9F01;">
                <input type="button" value="Đơn đặt hàng" class="cpointer" onclick="AdminController.showOverlayProcessProductOrder();">
            </li>
            <li style="color: #FC9F01;">
                Kết quả tìm kiếm
            </li>
        </ul>

    </div>
    <div class="order-item">
        <ul>
            <li class="title-first">Sắp xếp:</li>
            <li>
                <a class="<?php echo ($orderType == 'id-down') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('id-down', '<?php echo $page; ?>')">ID giảm</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'id-up') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('id-up', '<?php echo $page; ?>')">ID tăng</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'date-down') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('date-down', '<?php echo $page; ?>')">Ngày đăng giảm</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'date-up') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('date-up', '<?php echo $page; ?>')">Ngày đăng tăng</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'price-down') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('price-down', '<?php echo $page; ?>')">Giá giảm</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'price-up') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('price-up', '<?php echo $page; ?>')">Giá tăng</a>
            </li>
        </ul>
    </div>

</div>
<div>
    <table cellpadding="0" cellspacing="0" width="100%" align="left" class="table-list">
        <col >
        <col >
        <col >
        <col >
        <col >
        <?php if (isset($aryProduct[0])) { ?>
            <?php foreach ($aryProduct as $key => $value) { ?>
                <tr class="<?php echo ($key % 2 == 0) ? 'alt' : '' ?>">

                    <td class="product-img">
                        <div>
                            <a href="<?php echo $root_page; ?>/product/<?php echo $value['product_id']; ?>/<?php echo $value['product_title_filter']; ?>.html">
                                <img src="<?php echo $sub_domain; ?>/images/upload/thumbnail/<?php echo $value['product_main_image']; ?>" border="0" align="middle">
                            </a>
                        </div>
                    </td>
                    <td>
                        <div class="product-name">
                            <a  href="<?php echo $root_page; ?>/product/<?php echo $value['product_id']; ?>/<?php echo $value['product_title_filter']; ?>.html"><?php echo $value['product_title']; ?></a>
                        </div>
                        <div class="product-des">
                            <?php echo $value['product_highlight']; ?>
                        </div>
                    </td>
                    <td class="list_product_detail">
                        <?php if ($value['product_price_active_km'] == 1) { ?>
                            <div class="older_price">
                                Giá cũ : <?php echo number_format($value['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ
                            </div>
                            <div>
                                Giá KM : <?php echo number_format($value['product_price_vnd_km'], 0, ',', '.'); ?>&nbsp;VNĐ
                            </div>
                        <?php } else { ?>
                            <div>
                                Giá :<?php echo number_format($value['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ
                            </div>
                        <?php } ?>

                        <div>
                            <?php if ($value['product_is_vat'] == 1) { ?>
                                (Có VAT)
                            <?php } else { ?>
                                (Chưa có VAT)
                            <?php } ?>
                        </div>
                        <div>
                            Bảo hành :&nbsp;<?php echo $value['product_warranty_name']; ?>
                        </div>
                        <div>
                            Trong kho :&nbsp;<?php echo $value['product_store_name']; ?>
                        </div>
                        <div>
                            Khuyến mại :&nbsp;<?php echo $value['product_promotional']; ?>
                        </div>
                    </td>
                    <td>
                        <div>
                            Danh mục
                        </div>
                        <div>
                            <?php echo $value['product_category_name']; ?>
                        </div>
                        <div>
                            Người đăng: <?php echo $value['product_creator_name']; ?>
                        </div>
                        <div>
                            Ngày đăng: <?php echo date('d/m/Y', strtotime($value['product_created_date'])) ?>
                        </div>
                        <div>
                            Người cập nhật: <?php echo $value['product_updater_name']; ?>
                        </div>
                        <div>
                            Ngày cập nhật: <?php echo date('d/m/Y', strtotime($value['product_updated_date'])) ?>
                        </div>
                    </td>
                    <td>
                        <span class="cpointer" id="order_item_<?php echo $value['product_id']; ?>"  onclick="AdminController.addProductToOrder('<?php echo $value['product_id']; ?>');"><img id="img_order_item_<?php echo $value['product_id']; ?>" src="<?php echo $sub_domain; ?>/images/blackadmin/cart_put.png" title="Thêm sản phẩm vào đơn hàng"></span>
                    </td>
                    <td>
                        <div>
                            <?php if ($perProductEdit == 2 || $isMaster == 1) { ?>
                                <span class="cpointer" onclick="AdminController.editProduct('<?php echo $value['product_id']; ?>', '<?php echo $value['product_category_id']; ?>');"><img src="<?php echo $sub_domain; ?>/images/form/icon-edit.gif" title="Sửa sản phẩm này"></span>
                            <?php } ?>
                        </div>
                    </td>
                    <td>
                        <div>
                            <?php if ($perProductDelete == 3 || $isMaster == 1) { ?>
                                <span class="cpointer" onclick="AdminController.deleteProduct('<?php echo $value['product_id']; ?>');"><img src="<?php echo $sub_domain; ?>/images/form/delete.png" title="Xóa sản phẩm này"></span>
                            <?php } ?>
                        </div>
                    </td>
                </tr>
            <?php } ?>
        <?php } else { ?>
            <tr>
                <td style="width: 100%;text-align: center;color: #F58516;">
                    <div class="search_no_restul">Không tìm thấy dữ liệu</div>
                </td>
            </tr>
        <?php } ?>
    </table>
</div>
<div class="clear"></div>
<div align="right"><?php echo $strPaging; ?></div>